<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    </head>
    <body>
        <div id="app" title="application"></div>

        <script type="module">
            import util from './util.js'
            const app = document.getElementById('app')
            let a = document.createElement('a')
            a.href = 'http://abc'
            a.textContent = 'chrome'
            a.style = 'background-color:red;color:yellow'
            // Object.assign(a.style, {
            //     backgroundColor: 'red',
            //     color: 'white',
            // })
            console.log(a.style)

            app.appendChild(a)
            // console.log(app.dataset.title)

            // console.log(app.getAttribute('data-title'))
            // 标准属性 = 对象属性
            // 标准属性+自定义属性 = 特征
            // console.dir(app.attributes['hd'].value)
            // app.title = 'yahoo'
            // let attr = app.getAttribute('hd')
            // console.log(app.hasAttribute('title'))
        </script>
    </body>
</html>
